s1 = input()
s2 = input()
count = 0
i = 0
while i < len(s1):
    if s1[i] == s2[0]:
        j = i + 1
        k = 1
        while k < len(s2) and j < len(s1):
            if s1[j] == s2[k]:
                j += 1
                k += 1
            else:
                break
        if k == len(s2):
            count += 1
        i = j
    else:
        i += 1
print(count)